//
//  PicCollectionViewCell.m
//  Weibo
//
//  Created by wpapple on 16/6/4.
//  Copyright © 2016年 wpapple. All rights reserved.
//

#import "PicCollectionViewCell.h"

@interface PicCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIButton *picDel;

@end


@implementation PicCollectionViewCell

- (IBAction)picAddClicked:(UIButton *)sender {
    
    NSLog(@"%s",__func__);
    
    [[NSNotificationCenter defaultCenter]postNotificationName:KweiboAddPicture object:nil];
}

- (IBAction)picDelClicked:(UIButton *)sender {
    
    NSLog(@"%s",__func__);
    
    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
    
    dict[@"images"] = self.picImage;
    
    [[NSNotificationCenter defaultCenter]postNotificationName:KweiboCancelPicture object:nil userInfo:dict];
}

-(void)setPicImage:(UIImage *)picImage
{
    _picImage = picImage;
    
    [self.picAdd setBackgroundImage:picImage forState:UIControlStateNormal];
}
@end
